<?php

interface IQueryObject
{

  /**
   *
   * @param mixed $fields
   * @return IQueryObject
   */
  public function select($fields = null);

  /**
   *
   * @param mixed $table
   * @return IQueryObject
   */
  public function from($table = null);

  /**
   *
   * @param string $table
   * @param string $condition
   * @param string $type
   * @return IQueryObject
   */
  public function join($table = null, $condition = null, $type = null);

  /**
   *
   * @param string $s
   * @return IQueryObject
   */
  public function groupBy($s = null);

  /**
   *
   * @param string $s
   * @return IQueryObject
   */
  public function having($s = null);

  /**
   *
   * @param string $s
   * @return IQueryObject
   */
  public function where($s = null);

  /**
   *
   * @param string $s
   * @param string $direction
   * @return IQueryObject
   */
  public function orderBy($s = null, $direction = 'ASC');

  /**
   *
   * @param integer $limit
   * @return IQueryObject
   */
  public function limit($limit = null);

  /**
   *
   * @param integer $offset
   * @return IQueryObject
   */
  public function offset($offset = null);

  /**
   *
   * @param string $sql
   * @return IQueryObject
   */
  public function sql($sql = null);

  /**
   *
   * @param mixed $data
   * @return IQueryResult
   */
  public function execute($data = null);

  /**
   *
   * @return IQueryResult
   */
  public function executeRaw();

}

?>